/**
 * 给定字符串S，将所有不是c1的字母都替换为c2。
 * 简单题。
 */
#include <bits/stdc++.h>
#include <bits/extc++.h>
using namespace std;

using Real = long double;
using llt = long long;
using vi = vector<int>;
using vll = vector<llt>;
using pii = pair<int, int>;
using pll = pair<llt, llt>;
using i128 = __int128_t;

int N;
char C1, C2;
string S;

void work(){
    cin >> N >> C1 >> C2 >> S;
    for(auto c : S){
        if(c != C1) cout << C2;
        else cout << c;
    }
    cout << endl;
    return;

}

int main(){
#ifndef ONLINE_JUDGE
    freopen("z.txt", "r", stdin);
#endif
    ios::sync_with_stdio(0); cin.tie(0); cout.tie(0);	
    int nofkase = 1;
	// cin >> nofkase;
	while(nofkase--) work();
	return 0;
}